package pattern.dynamicProxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

public class Client {

	public static void main(String args[]) {
		InvocationHandler handler = new DynamicProxy();
		Subject subject2 = (Subject)Proxy.newProxyInstance(handler.getClass().getClassLoader(), 
				SubjectImpl.class.getInterfaces(), handler);
		subject2.test();
	}
}
